<?php defined('_VALID_MOS') or die('Direct Access to this location is not allowed.'); ?>

<script language="javascript" type="text/javascript">
    function submitbutton(pressbutton) {
        var form = document.adminForm;
        if (pressbutton == 'cancel') {
            submitform( pressbutton );
            return;
        }

        if (form.round_name.value == ""){
            alert( 'Must have a name' );
        }
        else {
            submitform( pressbutton );
        }
    }
</script>

<form action="index2.php" method="post" name="adminForm" id="adminForm">
    <table cellpadding="4" cellspacing="0" border="0" width="100%">
        <tr>
            <td width="100%">
                <span class="sectionname">
                    <?php echo $this->project->getName(); ?> - <?php echo $this->row->getID() ? $this->row->getName() : 'Add a new Round'; ?>
                </span>
            </td>
        </tr>
    </table>

    <?php
    $ptabs = new mosTabs( 0 );
    $ptabs->startPane( "com_leagueman" );
    $ptabs->startTab("General", "General-page");
    ?>

    <table cellpadding="4" cellspacing="1" border="0" width="100%" class="adminform">
        <tr>
            <td width="15%" align="right"><?php label('Name:') ?></td>
            <td width="85%">
                <input class="inputbox" type="text" name="round_name" size="64" value="<?php echo $this->row->getName(); ?>" />
            </td>
        </tr>
        <tr>
            <td align="right"><?php label('ShortName:') ?></td>
            <td>
                <input class="inputbox" type="text" name="round_name_short" size="64" value="<?php echo $this->row->getShortName(); ?>" />
            </td>
        </tr>
        <tr>
            <td align="right"><?php label('Ordering:') ?></td>
            <td>
                <input class="inputbox" type="text" name="ordering" size="64" value="<?php echo $this->row->getOrdering(); ?>" />
            </td>
        </tr>
    </table>

    <?php
    $ptabs->endTab();
    $ptabs->endPane();
    ?>

    <input type="hidden" name="round_id" value="<?php echo $this->row->getID(); ?>" />
    <input type="hidden" name="round_project" value="<?php echo $this->project->getID(); ?>">
    <input type="hidden" name="option" value="com_leagueman" />
    <input type="hidden" name="act" value="rounds" />
    <input type="hidden" name="task" value="" />
</form>